#!/usr/bin/python
# -*- coding: UTF-8 -*-

import requests as _request


class Http:
    _session = _request.Session()

    def __init__(self, log_url, log_data, headers):
        self.login(log_url, log_data, headers)

    def login(self, url, data, headers):
        resp = self._session.post(url, data=data, headers=headers)
        print(resp.content)

    def get(self, url):
        resp = self._session.get(url)
        print(resp.content)
        return resp.content

    def post(self, url, data):
        resp = self._session.post(url, data=data)
        print(resp.content)
        return resp.content


